package com.sgj.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sgj.common.utils.PageUtils;
import com.sgj.gulimall.product.entity.AttrGroupEntity;
import com.sgj.gulimall.product.vo.AttrGroupWithAttrsVo;
import com.sgj.gulimall.product.vo.SkuItemVo.*;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author guojishen
 * @email 1261550408@qq.com
 * @date 2021-06-11 14:21:46
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, Long catLogId);

    /**
     * 根据分类id查出所有的分组以及这些组里面的属性
     * @param catelogId
     * @return
     */
    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catelogId);

    /**
     * 获取 spu 规格参数信息
     * @param spuId
     * @param catalogId
     * @return
     */
    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}